const Mock=require('mockjs')
const data=Mock.mock({
    'list|10':[{
        'img':"@image(50x50,@color,@cword)",
        'title': '@ctitle(2,4)',
        'id':"@id"
    }]
})
const cent=Mock.mock({
    'list|10':[{
        'img':"@image(100x100,@color,@cword)",
        'title': '@ctitle(6,10)',
        'word':'@cword(6)',
        'money|200-999': 1,
        'id':"@id"
    }]
})
module.exports=(app)=>{
    app.post('/api/getlist',(req,res)=>{
        res.send(data)
    })
    app.post('/api/getcent',(req,res)=>{
        res.send(cent)
    })
}